package com.atguigu.gulimall.ware.service;

import com.atguigu.gulimall.common.to.mq.OrderTO;
import com.atguigu.gulimall.common.to.mq.StockLockedTO;
import com.atguigu.gulimall.common.utils.PageUtils;
import com.atguigu.gulimall.ware.entity.WareSkuEntity;
import com.atguigu.gulimall.ware.vo.SkuHasStockVo;
import com.atguigu.gulimall.ware.vo.WareSkuLockVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * ??Ʒ???
 *
 * @author wardseptember
 * @email wardseptember@163.com
 * @date 2020-06-02 19:39:50
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void addStock(Long skuId, Long wareId, Integer skuNum);

    List<SkuHasStockVo> getSkusHasStock(List<Long> skuIds);

    Boolean orderLockStock(WareSkuLockVO vo);

    void unlockStock(StockLockedTO to);

    void unlockStock(OrderTO orderTO);
}

